package com.chatcompetition.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chatcompetition.domain.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {
    @Select("SELECT * FROM employee WHERE employee_number = #{employeeNumber} AND employee_password = #{employeePassword} AND employee_department = #{employeeDepartment}")
    Employee findByEmployeeNumberAndEmployeePasswordAndDepartment(@Param("employeeNumber") String employeeNumber, @Param("employeePassword") String employeePassword, @Param("employeeDepartment") String employeeDepartment);


    // 根据工号查询员工的 employee_status
    @Select("SELECT employee_status FROM employee WHERE employee_number = #{employeeNumber}")
    Integer findEmployeeStatusByEmployeeNumber(@Param("employeeNumber") String employeeNumber);
}